// (c) Copyright Fernando Cerqueira.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.

using System.ComponentModel;
using Microsoft.Windows.Design;
using Microsoft.Windows.Design.Features;
using Microsoft.Windows.Design.Metadata;

namespace DevPhone.Controls.Design
{
    internal class ExpanderControlMetadata : AttributeTableBuilder
    {
        public ExpanderControlMetadata()
        {
            // Type attributes
            AddCustomAttributes(typeof(ExpanderControl), new DescriptionAttribute("Represents a container that can collapsed and expanded."));
            AddCustomAttributes(typeof(ExpanderControl), new FeatureAttribute(typeof(ExpanderControlInitializer)));
            AddCustomAttributes(typeof(ExpanderControl), new ToolboxBrowsableAttribute(true));

            // Hide properties
            AddCustomAttributes(typeof(ExpanderControl), "Height", new BrowsableAttribute(false));
            AddCustomAttributes(typeof(ExpanderControl), "Background", new BrowsableAttribute(false));
            AddCustomAttributes(typeof(ExpanderControl), "Foreground", new BrowsableAttribute(false));

            // Property attributes
            AddCustomAttributes(typeof(ExpanderControl), "Header", new CategoryAttribute(MetadataStore.ExpanderProperties));
            AddCustomAttributes(typeof(ExpanderControl), "Header", new DescriptionAttribute("Gets or sets the header."));

            AddCustomAttributes(typeof(ExpanderControl), "IsExpanded", new CategoryAttribute(MetadataStore.ExpanderProperties));
            AddCustomAttributes(typeof(ExpanderControl), "IsExpanded", new DescriptionAttribute("Gets or sets the state: collapsed or expanded."));

            AddCustomAttributes(typeof(ExpanderControl), "EllipseBrush", new CategoryAttribute(MetadataStore.BrushesProperties));
            AddCustomAttributes(typeof(ExpanderControl), "EllipseBrush", new DescriptionAttribute("Gets or sets the brush from Ellipse."));

            AddCustomAttributes(typeof(ExpanderControl), "EllipseArrow", new CategoryAttribute(MetadataStore.BrushesProperties));
            AddCustomAttributes(typeof(ExpanderControl), "EllipseArrow", new DescriptionAttribute("Gets or sets the brush from internal arrow of Ellipse."));

            AddCustomAttributes(typeof(ExpanderControl), "DisabledBrush", new CategoryAttribute(MetadataStore.BrushesProperties));
            AddCustomAttributes(typeof(DropDownControl), "DisabledBrush", new DescriptionAttribute("Gets or sets the foreground brush from disabled state."));

            AddCustomAttributes(typeof(ExpanderControl), "HeaderBrush", new CategoryAttribute(MetadataStore.BrushesProperties));
            AddCustomAttributes(typeof(ExpanderControl), "HeaderBrush", new DescriptionAttribute("Gets or sets the foreground brush from header."));

            AddCustomAttributes(typeof(ExpanderControl), "HeaderBackground", new CategoryAttribute(MetadataStore.BrushesProperties));
            AddCustomAttributes(typeof(ExpanderControl), "HeaderBackground", new DescriptionAttribute("Gets or sets the background brush from header."));

            AddCustomAttributes(typeof(ExpanderControl), "ControlBackground", new CategoryAttribute(MetadataStore.BrushesProperties));
            AddCustomAttributes(typeof(ExpanderControl), "ControlBackground", new DescriptionAttribute("Gets or sets the control background color."));


        }

    }
}